﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QuanLyChungCu_V
{
    public partial class dlgKhachHang : Form
    {
        public dlgKhachHang()
        {
            InitializeComponent();
        }
        public Guid id 
        {
            get { return Guid.Parse(mtxtMaKH.Text); }
        }
        public string name 
        {
            get { return mtxtTenKH.Text; }
        }
        public int age
        {
            get { return int.Parse(mtxtTuoi.Text); }
        }
        public bool sex 
        {
            get
            {
                if (sex == false)
                    return bool.Parse(rbtFemale.Text);
                else
                    return bool.Parse(rbtMale.Text);
            }
        }
        public string address 
        {
            get { return mtxtDiachi.Text; }
        }
        public DateTime date_of_birth 
        {
            get { return DateTime.Parse(dtiNgaysinh.Text); }
        }
        public string id_card_no 
        {
            get { return mtxtSoCMT.Text;}
        }
        public string id_job
        {
            get { return cboNgheNghiep.Text;}
        }
        public string phone_num 
        {
            get { return mtxtSoDT.Text;}
        }

        private void btOK_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }

        private void btCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
        }

        private void dlgKhachHang_Load(object sender, EventArgs e)
        {

        }
    }
}
